package cn.kgm.article.dto.dto;

import cn.kgm.core.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * # 技术改变自己 #
 * @author kapi
 * @date 2024-03-15 14:38:00
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel(value = "ArticleInfoUpdateDTO", description = "文章详情")
public class ArticleInfoUpdateDTO extends Entity<Long> {

    /**
     * 文本内容
     */
    @ApiModelProperty(value = "文本内容", position = 2)
    @Size(max = 2147483647, message = "文本内容长度不能超过2147483647")
    @NotBlank(message = "文本内容不能为空")
    private String content;

    /**
     * 用户ip地址
     */
    @ApiModelProperty(value = "用户ip地址", position = 3)
    @Size(max = 16, message = "用户ip地址长度不能超过16")
    @NotBlank(message = "用户ip地址不能为空")
    private String ip;

    /**
     * 文章状态:UNDER_REVIEW,待审核
     */
    @ApiModelProperty(value = "文章状态:UNDER_REVIEW,待审核", position = 4)
    @Size(max = 16, message = "文章状态:UNDER_REVIEW,待审核长度不能超过16")
    @NotBlank(message = "文章状态:UNDER_REVIEW,待审核不能为空")
    private String state;

}
